package com.yztc.orangeentertainment.ui.main.subscribefragment.staritem;

import android.content.Context;

import com.yztc.orangeentertainment.bean.staritembean.StarInfoStarBean;
import com.yztc.orangeentertainment.config.SubscribeUrlConfig;

import java.util.Map;

/**
 * Created by My on 2016/10/7.
 */
public class StarItemPresenter implements StarItemContract.Presenter {
    private StarItemContract.View view;
    private StarItemModle modle;

    public StarItemPresenter(StarItemContract.View view) {
        this.view = view;
        modle=new StarItemModle();
    }

    @Override
    public void getStarItemFromNet(Map<String, String> params, Context context) {
        modle.getStarItemAll(SubscribeUrlConfig.PATH.URL_STARINFO_TYPE, params, new OnLoadStarItemListener() {
            @Override
            public void onSuccess(StarInfoStarBean starBean) {
                view.onLoadStarItemSuccess(starBean);
            }

            @Override
            public void onFailure(Exception e) {

            }
        },context);
    }

    @Override
    public void getStarItemFromDb() {

    }
}
